package o;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import com.huawei.gamebox.service.welfare.gift.bean.GameGiftCardBean;
import java.util.List;
import o.exp.d;
import o.exp.j;

public class fcg extends fcp {
    public fcg(eix o_eix) {
        super(o_eix);
    }

    public int ˏ(Context context, List<GameGiftCardBean> list) {
        if (CollectCheck.isEmpty(list)) {
            return 0;
        }
        int[] iArr;
        int ˎ = ((this.ˊ.ˎ() + 0) + this.ˊ.ˋ()) + this.ˊ.ˏ();
        View inflate = LayoutInflater.from(context).inflate(j.ˍ, null);
        TextView textView = (TextView) inflate.findViewById(d.ˊ);
        TextView textView2 = (TextView) inflate.findViewById(d.ˏ);
        int i = 0;
        int i2 = 0;
        int[] iArr2 = null;
        int[] iArr3 = null;
        for (GameGiftCardBean gameGiftCardBean : list) {
            int i3;
            if (i2 == 0) {
                iArr3 = ॱ(textView, gameGiftCardBean.v_(), this.ˊ.ˊ());
                if (iArr3[0] >= this.ˊ.ˊ()) {
                    i2 = 1;
                }
            }
            if (i == 0) {
                iArr2 = ॱ(textView2, String.valueOf(gameGiftCardBean.ॱ()), this.ˊ.ʼ());
                if (iArr2[0] >= this.ˊ.ʼ()) {
                    i3 = 1;
                    iArr = iArr2;
                    if (i2 == 0 && i3 != 0) {
                        break;
                    }
                    iArr2 = iArr;
                    i = i3;
                }
            }
            i3 = i;
            iArr = iArr2;
            if (i2 == 0) {
            }
            iArr2 = iArr;
            i = i3;
        }
        iArr = iArr2;
        return ॱ(ˎ, iArr3, iArr);
    }
}
